The standard input/output (I/O) library for C++ is <iostream.h>, not <stdio.h>. Although C++ supports the "old" I/O functions, you should probably get use to using streams. The following provides the basics of using C++ streams.
The following snippet shows how to use the basics of using C++ I/O streams. The insert operator '<<' and extraction operator '>>' are used to send and get data from the screen and keyboard.
// io.cp
#include <iostream.h>
#include <iomanip.h>
void main( void )
{
int i;
float f;
char c;
cout << "Enter an integer: ";
cin >> i;
cout << "Enter a float: ";
cin >> f;
cout << "Enter a character: ";
cin >> c;
cout << endl;
cout << "Default formats" << endl;
cout << i << endl;
cout << f << endl;
cout << c << endl;
cout << endl << "Other formats" << endl;
cout << hex << i << endl;
cout << setprecision(2) << f << endl;
cout << setiosflags( ios::scientific ) << f << endl;